package com.maidu.xiaoshuo.ui;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTabHost;
import android.widget.TabWidget;

import com.maidu.xiaoshuo.R;

public class MainActivity extends FragmentActivity {
	private FragmentTabHost mTabHost;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ui_main_tab);
		
        mTabHost = (FragmentTabHost)findViewById(android.R.id.tabhost);
        mTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);
        
        mTabHost.addTab(mTabHost.newTabSpec("home").setIndicator(getLayoutInflater().inflate(R.layout.tab_home, null)),
                HomeFragment.class, null);
        mTabHost.addTab(mTabHost.newTabSpec("bookstore").setIndicator(getLayoutInflater().inflate(R.layout.tab_bookstore, null)),
        		BookstoreFragment.class, null);
        mTabHost.addTab(mTabHost.newTabSpec("setting").setIndicator(getLayoutInflater().inflate(R.layout.tab_setting, null)),
                SettingFragment.class, null);
        
       TabWidget tabWidget = mTabHost.getTabWidget(); 
        
	}
	
	
}
